﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MishraReader.ViewModels.Tools
{
    public interface IWrappedCollectionView
    {
        bool MoveCurrentTo(object item);
        bool MoveCurrentToPosition(int position);
        bool IsCurrentAfterLast { get; }
        bool MoveCurrentToFirst();
        bool IsCurrentBeforeFirst { get; }
        bool MoveCurrentToLast();
        bool MoveCurrentToNext();
        bool MoveCurrentToPrevious();
    }

    public interface IWrappedCollectionViewSource
    {
        object UnderlyingSource { get; }
        IWrappedCollectionView View { get; }
        object Source { get; set; }
    }

    public static class CollectionViewSourceFactory
    {
        public static IWrappedCollectionViewSource Create()
        {
            return ServiceLocator.Current.GetInstance<IWrappedCollectionViewSource>();
        }
    }
}
